﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FunctionUI.aspx.cs" Inherits="ThangNM.Admin.FunctionUI" MasterPageFile="~/PublicInterface/Admin.Master" %>
<%@ Register src="~/UserControl/MsgUC.ascx" tagname="MsgUC" tagprefix="uc1" %>
<%@ Register src="~/UserControl/Title_FormUC.ascx" tagname="Title_FormUC" tagprefix="uc3" %>
<%@ Register src="~/UserControl/ToolBarUC.ascx" tagname="ToolBarUC" tagprefix="uc2" %>

<asp:Content ID="cBody" runat="server" ContentPlaceHolderID="cphBody">
    <uc3:Title_FormUC ID="Title_FormUC1" runat="server" />
    <uc1:MsgUC ID="MsgUC1" runat="server" /><br />
    <fieldset id="pnlDetail" runat="server">
        <legend>Chức năng chính</legend>
        <div class="form-group input-group">
			<asp:Label id="lblsUrl" runat="server" class="input-group-addon title_input" Text="Địa chỉ:"></asp:Label>
            <asp:TextBox id="txtsUrl" runat="server" Width="500px" class="form-control" MaxLength="200" autocomplete="off"></asp:TextBox>
            <span class="notnull">(* Bắt buộc)</span>
        </div>
        <div class="form-group input-group">
			<asp:Label id="lblsName" runat="server" class="input-group-addon title_input" Text="Tên chức năng:"></asp:Label>
            <asp:TextBox id="txtsName" runat="server" Width="500px" class="form-control" MaxLength="200" autocomplete="off"></asp:TextBox>
            <span class="notnull">(* Bắt buộc)</span>
        </div>
        <div class="form-group input-group">
			<asp:Label id="lblbStatus" runat="server" class="input-group-addon title_input" Text="Trạng thái:"></asp:Label>
            <asp:CheckBox ID="chkbStatus" runat="server" Width = "500px" CssClass="form-control" Checked="true" />
            <span class="notnull">(* Bắt buộc)</span>
        </div>
        <div class="form-group input-group">
			<asp:Label id="lblAttach" runat="server" class="input-group-addon title_input" Text="Chức năng con:"></asp:Label>
            <center><input id="chkAll" type="checkbox" onclick="checkAll(this, 'divGR');"/><label for="chkAllGR">Select All</label><hr class="hr_style" /></center>
            <div id="divGR" style="height:100px;overflow-y: scroll; width:500px;"><asp:CheckBoxList ID="cbliAttach" runat="server" autocomplete="off"></asp:CheckBoxList></div>
        </div>
        <div class="form-group input-group">
			<asp:Label id="lblFull" runat="server" class="input-group-addon title_input" Text="Áp dụng cho tất cả các chức năng con đi kèm:"></asp:Label>
            <asp:CheckBox ID="chkFull" runat="server" autocomplete="off" />
        </div>
        <div class="form-group input-group">
			<asp:Label id="lblsRole" runat="server" class="input-group-addon title_input" Text="Cấp quyền mặc định cho nhóm tài khoản:"></asp:Label>
            <center><input id="chkAllRole" type="checkbox" onclick="checkAll(this, 'divsRole');"/><label for="chkAllRole">Select All</label><hr class="hr_style" /></center>
            <div id="divsRole" style="height:100px;overflow-y: scroll; width:500px;"><asp:CheckBoxList ID="cblsRole" runat="server" autocomplete="off"></asp:CheckBoxList></div>
        </div>
    </fieldset>
    <uc2:ToolBarUC ID="ToolBarUC1" runat="server" OnEventButtonToolBar="EventButtonToolBar_Click"/>
    <br /><br />
    <asp:GridView ID="grvList" runat="server" AutoGenerateColumns="False" 
        class="table table-striped table-bordered table-hover dataTable no-footer styleGrid"
        ShowFooter = "True" DataKeyNames="PK_iFunctionID"
        EnableModelValidation="True" emptydatatext="Không có bản ghi nào."
        onrowcommand="grvList_RowCommand" CellPadding="3">
        <Columns>
            <asp:TemplateField>
			    <ItemTemplate>
				    <asp:LinkButton ID="cmdView" runat="server" CommandName="cmdView" Width="90px" CommandArgument='<%#Eval("PK_iFunctionID")%>'>Chi tiết</asp:LinkButton>
				</ItemTemplate>
			    <ItemStyle HorizontalAlign="Center" />
		    </asp:TemplateField>
            <asp:BoundField  DataField="PK_iFunctionID"  HeaderText="Mã chức năng" SortExpression="PK_iFunctionID">
			    <ItemStyle CssClass="GridItemNumber"/>
		    </asp:BoundField>
            <asp:BoundField  DataField="sUrl"  HeaderText="Địa chỉ" SortExpression="sUrl">
			    <ItemStyle CssClass="GridItemText"/>
		    </asp:BoundField>
            <asp:BoundField  DataField="sName"  HeaderText="Tên chức năng" SortExpression="sName">
			    <ItemStyle CssClass="GridItemText"/>
		    </asp:BoundField>
            <asp:BoundField  DataField="bStatus"  HeaderText="Trạng thái" SortExpression="bStatus">
			    <ItemStyle CssClass="GridItemCode"/>
		    </asp:BoundField>
            <asp:BoundField  DataField="Total"  HeaderText="Số chức năng con" SortExpression="Total">
			    <ItemStyle CssClass="GridItemNumber"/>
		    </asp:BoundField>
        </Columns>
        <HeaderStyle BackColor="#66CCFF"/>
    </asp:GridView>
    <br /><br /><br /><br /><br />
</asp:Content>